using System;

namespace OpenRay
{
	//Immutable class
	public struct Ray
	{
		public readonly Point Origin;
		public readonly Vector Direction;
		
		public Ray ( Point o, Vector d )
		{
			Origin = o;
			Direction = d;
		}
		
		public static Ray operator * ( Matrix m, Ray r ) 
		{
			return new Ray( m * r.Origin, m * r.Direction );
		}
	}
}

